package com.kcral.javase.ch.properties;

/**
 * @TODO
 * @Author xu
 * 2025/3/3
 */
public class User {
    private String name;        // 用户姓名

    public User(String name) {
        this.name = name;
    }

    // 下单方法
    public Order placeOrder(String orderId) {
        Order newOrder = new Order(orderId);
        System.out.println(name + " 下单成功，订单号: " + orderId);
        return newOrder;
    }
}
